package com.gxa.saas.admin.service.impl;

import com.gxa.saas.admin.entiry.COVO;
import com.gxa.saas.admin.entiry.GBOrderVO;
import com.gxa.saas.admin.mapper.GBOrderMapper;
import com.gxa.saas.admin.service.GBOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class GBOrderServiceImpl implements GBOrderService {

    @Autowired
    private GBOrderMapper gbOrderMapper;

    @Override
    public List<GBOrderVO> queryAllOrder() {
        return gbOrderMapper.queryAllOrder();
    }

    @Override
    public List<GBOrderVO> queryAllByCon(COVO covo) {
        if(covo.getOrderNum()=="") covo.setOrderNum(null);
        if(covo.getGoodsName()=="") covo.setGoodsName(null);
        System.out.println(covo+"=======================");
        return gbOrderMapper.queryAllByCon(covo);
    }
}
